import 'package:hive/hive.dart';

part 'bt_logon_data.g.dart';

@HiveType(typeId: 1)
class BtLogonData {
  @HiveField(0)
  String? token;

  @HiveField(1)
  String userId;

  @HiveField(2)
  int userType;

  @HiveField(3)
  String nickname;

  @HiveField(4)
  String avatarUrl;

  @HiveField(5)
  String avatarThumbUrl;

  @HiveField(6)
  String loginPkgName;

  @HiveField(7)
  String country;

  @HiveField(8)
  String? birthday;

  @HiveField(9)
  int availableCoins;

  BtLogonData({
    this.token,
    required this.userId,
    required this.userType,
    required this.nickname,
    required this.avatarUrl,
    required this.avatarThumbUrl,
    required this.loginPkgName,
    required this.country,
    required this.birthday,
    required this.availableCoins,
  });

  @override
  String toString() {
    return '$nickname: $country';
  }
}
